﻿-- =============================================
-- Script Template
-- =============================================
USE [DB_Ex]
GO

/****** Object:  Table [dbo].[SP_Log]    Script Date: 12/05/2011 10:18:42 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[SP_Log](
	[id] [uniqueidentifier] NOT NULL,
	[DT] [datetime] NOT NULL,
	[MachineName] [nvarchar](50) NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Key] [nvarchar](50) NOT NULL,
	[SubKey] [nvarchar](50) NULL,
	[Value] [nvarchar](max) NULL,
	[Msg] [nvarchar](max) NULL,
	[ErrID] [int] NULL,
	[WarningLevel] [int] NULL,
	[RetCode] [int] NULL,
	[CountInfo] [int] NULL,
 CONSTRAINT [PK_SP_Log] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[SP_Log] ADD  CONSTRAINT [DF_SP_Log_id]  DEFAULT (newid()) FOR [id]
GO

ALTER TABLE [dbo].[SP_Log] ADD  CONSTRAINT [DF_SP_Log_DT]  DEFAULT (getdate()) FOR [DT]
GO


